package cn.funeralobjects.ams.web.controller;

import cn.funeralobjects.ams.service.BaseAmsService;
import cn.funeralobjects.ams.web.api.BaseAmsApi;
import cn.funeralobjects.common.service.CodeService;
import cn.funeralobjects.common.service.CommonModifyService;
import cn.funeralobjects.common.service.EntityService;
import cn.funeralobjects.common.service.IdService;
import cn.funeralobjects.common.web.controller.CommonModifyController;
import cn.funeralobjects.common.web.controller.RestCodeController;
import cn.funeralobjects.common.web.controller.RestEntityController;

/**
 * @author FuneralObjects
 * Create date: 2020/5/26 9:11 AM
 */
public interface BaseAmsController<VO, VModify, Modify, Entity, ID> extends BaseAmsApi<VO, VModify, ID>,
        RestEntityController<VO, Entity, ID>,
        RestCodeController<VO, Entity, ID>,
        CommonModifyController<VO, VModify, Modify, Entity, ID> {

    /**
     * baseAmsService
     *
     * @return baseAmsService
     */
    BaseAmsService<Modify, Entity, ID> baseAmsService();

    /**
     * commonModifyService
     *
     * @return baseAmsService
     */
    @Override
    default CommonModifyService<Modify, Entity, ID> commonModifyService() {
        return baseAmsService();
    }

    /**
     * codeService
     *
     * @return baseAmsService
     */
    @Override
    default CodeService<Entity, ID> codeService() {
        return baseAmsService();
    }

    /**
     * entityService
     *
     * @return baseAmsService
     */
    @Override
    default EntityService<Entity, ID> entityService() {
        return baseAmsService();
    }

    /**
     * idService
     *
     * @return baseAmsService
     */
    @Override
    default IdService<ID> idService() {
        return baseAmsService();
    }
}
